// input value is a U.S. state abbreviation; set entered value to all uppercase
// also set companion field (NAME="<xxx>_expand") to full state name
function isUSState() {
	var inputStr = gField.value.toUpperCase()
	if (inputStr.length > 0 && USStates[inputStr] == null) {
		var msg = ""
		var firstChar = inputStr.charAt(0)
		if (firstChar == "A") {
			msg += "\n(Alabama = AL; Alaska = AK; Arizona = AZ; Arkansas = AR)"
		}
		if (firstChar == "D") {
			msg += "\n(Delaware = DE; District of Columbia = DC)"
		}
		if (firstChar == "I") {
			msg += "\n(Idaho = ID; Illinois = IL; Indiana = IN; Iowa = IA)"
		}
		if (firstChar == "M") {
			msg += "\n(Maine = ME; Maryland = MD; Massachusetts = MA;  " +
				      "Michigan = MI; Minnesota = MN; Mississippi = MS; " +
				      "Missouri = MO; Montana = MT)"
		}
		if (firstChar == "N") {
			msg += "\n(Nebraska = NE; Nevada = NV)"
		}
		alert("Check the spelling of the state abbreviation." + msg)
		gField.focus()
		gField.select()
		return false
	}
	gField.value = inputStr
	var expandField = window.frames[gFrame.name].document.forms[0].elements[gField.name + "_expand"]
	expandField.value = USStates[inputStr]
	return true
}
